#-*- coding: utf-8 -*-
from tutor.scripts import *
from tutor.plugins.sympy import *

# Entradas
with display_block('Entradas'):
    theta = pi / 2
    beta = cos(theta)
    a = One * oneof(1 / Three, Half, sqrt(2) / 2, sqrt(2), sqrt(3), 2, Three / 2, 3)
    b = a * (1 + beta)

# Respostas
with display_block('Respostas'):
    card = (3 * pi * a ** 2) / 2
    cardJ = 2 * pi * a
    cardCirc = a ** 2 * (2 * sin(theta) + cos(theta) * sin(theta) / 2 + theta / 2 - cos(theta) ** 2 * theta - 2 * cos(theta) * theta)
    cardCircJ = a * (sin(theta) - cos(theta) * theta)
    difCardCirc = abs(card - pi * b ** 2)
    difCardCircJ = abs(cardJ - pi * b ** 2)
    cardOutro = abs(card - cardCirc)
    cardOutroJ = abs(cardJ - cardCircJ)
